This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2001-343574, filed Nov. 8, 2001, the entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to a temperature sensor, and more particularly to a digital temperature sensor circuit having a trimming function.
2. Description of the Related Art
Temperature sensors are widely used in many fields, such as household electrical appliances and medical appliances. In recent years, they are also used in mobile communication equipment, for example, cellular phones. There are many types of temperature sensors, and it is important that they offer sufficient performance required in the respective fields.
A conventional temperature sensor will be described with reference to FIG. 1A. FIG. 1A is a block diagram showing a structure of a digital temperature sensor circuit.
As illustrated in FIG. 1A, a temperature sensor circuit 100 includes a PMOS transistor 110, pnp bipolar transistor 120, an A/D converter 130 and an adder 140. The transistor 110 functions as a current source, which supplies a current IF to the transistor 120. The transistor 120, whose base and collector are connected in common, functions as a diode. It outputs a temperature voltage VF in accordance with the current IF and the ambient temperature. The A/D converter 130 analog-to-digital converts the temperature voltage VF and outputs n-bit digital data. The adder 140 adds the digital data output from the A/D converter 130 to an offset value, which is also n-bit digital data. The adder 140 externally outputs the addition result as detected temperature data.
Thus, the illustrated temperature sensor circuit senses a temperature utilizing the fact that the voltage VF generated in the transistor 120 varies depending on the temperature. The offset value is data to correct the characteristic of the transistor 120. The characteristic correction of the transistor 120, utilizing the offset value, will be described with reference to FIG. 1B. FIG. 1B is a graph showing the dependence of the temperature voltage VF on temperature.
The transistor 120 is designed and manufactured so as to generate a preset temperature voltage VF at every point of temperature. It is assumed that the line xe2x80x9cpreset characteristicxe2x80x9d in FIG. 1B represents the preset temperature voltages. However, the dependence of the temperature voltage VF on temperature may be deviated from the original setting under the influence of manufacturing variations. It is assumed that the line xe2x80x9cactual characteristicxe2x80x9d in FIG. 1B represents the actual temperature voltages. Therefore, it is necessary to correct the deviation from the preset value (this correction is called trimming).
The trimming is performed as follows. In the example shown in FIG. 1B, the difference between the actual temperature voltage VF and the preset temperature voltage at a temperature T1 is measured. The difference value obtained by the measurement is converted to digital data and stored as the offset value in a memory of the temperature sensor circuit. When a temperature is detected, the offset value is added to digital data output from the A/D converter 130 and the addition result is output as detected temperature data.
As described above, the offset value determined in advance is added to an actual measurement value, thereby correcting the characteristic variations of the transistor 120, so that the temperature can be sensed accurately.
However, the trimming function of the conventional temperature sensor circuit described above does not always offer sufficient correcting performance. According to the conventional method, the set temperature voltage and the actual temperature voltage at a temperature (temperature T1) are compared, and the difference therebetween is set as an offset value. The offset value is added to the actual temperature voltage VF, thereby correcting the variations in characteristic. In other words, xe2x80x9ctrimmingxe2x80x9d means parallel translation of the line representing the actual characteristic of the temperature voltage VF in FIG. 1B so as to coincide with the line representing the preset characteristic. Therefore, if the two lines of characteristics are different in gradient, they cannot coincide with each other except for the point of the temperature T1. More specifically, as shown in FIG. 1B, when the preset characteristic and the corrected characteristic are compared, the temperature voltages VF of the two characteristics coincide only at the temperature T1, but they are completely different at the other temperatures (T2, T3).
As described above, in the conventional temperature sensor, the offset value is added to the detected value to carry out trimming, without correcting the actual temperature voltage VF itself. Therefore, if the gradient of the actual characteristic of the dependence of the temperature voltage is different from that of the preset characteristic, the correction cannot be made satisfactorily. In this case, the accuracy of detecting a temperature may deteriorate.
A temperature sensor circuit according to an aspect of the present invention comprises:
a temperature detecting circuit configured to generate a first temperature voltage in accordance with an ambient temperature and a current;
a preset value storing circuit which stores a second temperature voltage preset for a predetermined ambient temperature as a digital value; and
a current supplying circuit which supplies the current to the temperature detecting circuit, such that the first temperature voltage generated by the temperature detecting circuit at the predetermined ambient temperature is equal to the second temperature voltage.
A method for adjusting a temperature sensor circuit according to another aspect of the present invention comprises:
storing a first temperature voltage of a digital value corresponding to a predetermined temperature in a first storing circuit;
setting a control signal of a digital value to cause a current supplying circuit to supply a current;
converting an ambient temperature to a second temperature voltage based on the ambient temperature and the current;
controlling the current to equalize the first and second temperature voltages; and
storing in a second storing circuit the control signal which causes the current supplying circuit to supply the current that equalizes the first and second temperature voltages.